package cn.poem.controller;

import cn.poem.base.ResponseData;
import cn.poem.entity.AuthorBase;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.*;

/**
 * @Description 诗词人
 * @Author sugar
 * @Date 2021/6/9 11:35 AM
 * @Version 1.0
 */
@RequestMapping("poem/author/")
public interface AuthorController {

    /**
     * 1。诗词人列表分页
     * <p>
     * 2。收藏夹列表分页
     *
     */
    /**
     * 诗词人列表分页
     * @param page
     * @param size
     * @param authorBase
     * @return
     */
    @GetMapping("page/{page}/{size}")
    ResponseData<IPage<AuthorBase>> authorPage(@PathVariable("page") int page, @PathVariable("size") int size, AuthorBase authorBase);


    /**
     * 详情
     * @param aid
     * @return
     */
    @GetMapping("detail/{aid}")
    ResponseData<AuthorBase> authorDetail(@PathVariable("aid") long aid);

    @PostMapping("save")
    ResponseData<Boolean> saveAuthor(@RequestBody AuthorBase authorBase);

    @DeleteMapping("del/{aid}")
    ResponseData<Boolean> delAuthor(@PathVariable("aid") Long aid);








}
